home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / pcr / pcr4_4.lha / DIST / gc / INCLUDE / xr / GCenum_objs.h < prev    next >
Text File  |  1991-05-24  |  2KB  |  26 lines

  1.  
  2. typedef void (*callback_fn)
  3.     (/* XR_Pointer client_data, XR_Pointer obj, int sz, bool is_atomic */);
  4.  
  5. /* Call fn for each accessible object in the heap.  All calls are perfomed */
  6. /* with all threads not at GC priority stopped.  This does a full,         */
  7. /* stop-the-world garbage collection before the first call to fn.          */
  8. /* Garbage collector callbacks are NOT executed for this collection.       */
  9. /* The function fn must be prepared to run with the world stopped.  It     */
  10. /* may not acquire monitor locks, since                      */
  11. /* another thread may have been frozen while holding a lock.           */
  12. /* Fn is run on VP 0, and thus may use the UNIX stack for temporary        */
  13. /* storage if it chooses.                           */
  14. /* Sz is given in bytes, but is always a multiple of 4.  Small objects        */
  15. /* (currently sz <= 2048) may yield sz values larger than what was            */
  16. /* passed to the allocator.  Is_atomic is TRUE if the object is known       */
  17. /* not to contain any pointers.  If is_atomic is FALSE, and sz is larger   */
  18. /* than what was originally asked for, than any unused words should be 0.  */
  19. /* The pointer obj points to the beginning of the PCR object.  If the      */
  20. /* object is a valid Cedar object, then the Cedar pointer is obj+8.       */
  21. /* Since we don't have exact pointer info, obj may in fact be              */
  22. /* uncollected garbage.  It is guaranteed that the entire object is        */
  23. /* addressable.  Since there are non-Cedar allocation clients, type codes  */
  24. /* stored in the objects are not 100% reliable either.               */
  25. void XR_EnumObjs(/* callback_fn fn, XR_Pointer client_data*/);
  26.